import './index.less'
import { request } from 'umi';
import MyEchartsCom from '@/components/myEcharts';
import { useEffect, useState } from 'react';
export default () => {
    const [option, setoption] = useState(null)
    const getData = () => {
        request('/data/dynamic/query/1223', {
            method: 'GET',
        }).then((res) => {
            setoption(res?.data)
        })
    }
    useEffect(() => {
        getData();
    }, [])
    const initCharts = () => {
        return {
            ...{
                //在这里写一些公共样式啥的
            },
            ...option
        }
    }
    useEffect(() => {
        initCharts();
    }, [option])
    return <div className='queryPage'>
        {
            option && <MyEchartsCom option={initCharts()} title='' hidetitle style={{ width: '100%', height: '400px' }} />
        }

    </div>
}